package com.zrf.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zrf.dao.impl.BuyerDaoImpl;
import com.zrf.dao.impl.SellerDaoImpl;


@Service("loginService")
public class LoginService {

	
	@Autowired
	private BuyerDaoImpl bdi = null;
	@Autowired
	private SellerDaoImpl sdi = null;
	
	public boolean login(int type,String name,String password){
		switch (type) {
		case 1:
			return bdi.login(name, password);
			
		case 2:
			return sdi.login(name, password);
			
		}
		return false;
	}
	
	
}
